<?php

$this->headTitle("My Email");

?>

<p><a href="<?php echo $this->url(array('controller'=>'scheduler', 
        'action'=>'add'));?>">Add new email</a></p>
<table>

<tr>
    <th>Campaign</th>
    
    <th>List Contact</th>
    
    <th>Sending Time</th>
    
    <th>Created User</th>
    
    <th>Created Time</th>
    
    <th>Smtp id</th>
    
    <th>&nbsp;</th>
</tr>
<?php foreach($this->list as $list) : ?>

<tr>
    <td><?php echo $this->escape($list['campaign_id']);?></td>
    
    <td>
    	<table>
    		<?php foreach($list['list_ids'] as $id) 
    			:?>
    		<tr>
    			<td><?php echo $this->escape($id); ?></td>
    		</tr>
    		<?php endforeach; ?>
    	</table>
    </td>
    
    <td><?php echo $this->escape($list['sending_time']);?></td>
    
    <td><?php echo $this->escape($list['created_user']);?></td>
    
    <td><?php echo $this->escape($list['created_time']);?></td>
    
    <td><?php echo $this->escape($list['smtp_id']);?></td>
    
    <td>
        <a href="<?php echo $this->url(array('controller'=>'scheduler', 
            'action'=>'edit', 'id'=>$list['id']));?>">Edit</a>
            
        <a href="<?php echo $this->url(array('controller'=>'scheduler', 
            'action'=>'delete', 'id'=>$list['id']));?>">Delete</a>
    </td>
</tr>

<?php endforeach; ?>

</table>